package com.aitemv.web.roleTree;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.aitemv.entity.RoleTreeEntity;
import com.aitemv.services.RoleTreeService;
import com.aitemv.vo.RoleTreeVo;
import com.aitemv.web.base.BaseAction;
/**
 * @ClassName: RoleTreeAction 
 * @Description: 权限管理的action
 * @author java_lyvee@126.com 
 * @date 2014-1-13 上午11:47:09 
 */
@Controller
@RequestMapping(value = "/back/*")
public class RoleTreeAction extends BaseAction {
	@Autowired
	RoleTreeService roleTreeService;
	private static Logger logger = LoggerFactory.getLogger(RoleTreeAction.class);
	
	/**
	 * @Title: queryForList 
	 * @Description: 查询权限返回LIST
	 * @param request
	 * @param response
	 * @return  list
	 * @return List<RoleTreeVo>  返回类型
	 * @throws
	 */
	@RequestMapping(value = "queryRoleTreeList.do", method = RequestMethod.GET)
	public @ResponseBody List<RoleTreeVo> queryForList(HttpServletRequest request,
			HttpServletResponse response) {
		RoleTreeEntity entity = null;
		try {
			entity = (RoleTreeEntity)conditionParam(request, null, RoleTreeEntity.class);
		} catch (Exception e) {
			logger.error("权限管理的-查询权限", e);
		}
		List<RoleTreeVo> list = roleTreeService.qeuryFoList(entity);
		return list;
	}
	@Override
	public String forward(ModelMap model, HttpServletRequest request,
			HttpServletResponse response) {
		// TODO Auto-generated method stub
		return null;
	}

}
